home *** CD-ROM | disk | FTP | other *** search
- /*
- Taken from the C puzzle book.
- */
-
- #define PR(format,value) printf("value = %format\t",(value))
- #define NL putchar(n)
-
- #define PRINT1(f,x1) PR(f,x1), NL
- #define PRINT2(f,x1,x2) PR(f,x1), PRINT1(f,x2)
- #define PRINT3(f,x1,x2,x3) PR(f,x1), PRINT2(f,x2,x3)
- #define PRINT4(f,x1,x2,x3,x4) PR(f,x1), PRINT3(f,x2,x3,x4)
-
-
- PRINT1(d,1);
-
- PRINT2(d,1,2);
-
- PRINT3(d,1,2,3);
-
- PRINT4(d,1,2,3,4);
-